﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;

namespace NorthwindModel.IRepositories
{
    public interface IBaseRepository<T> where T : class
    {
        void Delete(T entity);
        void Add(T Entity);
        void Update(T Entity);
        void Save(T entity);
        int Commit();
        
        T FindSingleBy(Expression<Func<T, bool>> predicate);
        IQueryable<T> FindAllBy(Expression<Func<T, bool>> predicate);
        IQueryable<T> GetAll();
        IQueryable<T> GetIncluding(params Expression<Func<T, object>>[] includeProperties);

        void Dispose();
    }
}
